<?php

namespace App\Transformers\Category;

use League\Fractal\TransformerAbstract;

class ConfigCategoryShowTransformer extends TransformerAbstract
{

    /**
     * Transform a response with a transformer.
     *
     * @param $course_category
     * @return array
     */
    public function transform($course_category)
    {
        return [
            'id' => $course_category->id,
            'pid' => $course_category->pid,
            'name' => $course_category->name,
            'nickname' => $course_category->nickname,
            'type' => $course_category->type,
            'img' => $course_category->img,
            'status' => $course_category->status,
            'sort' =>  $course_category->sort,
        ];
    }
}
